/*****************************************************************************/
/* Main IO Config file                                                       */
/*                                                                           */
/* Copyright (C) 2013 Laszlo Arvai                                           */
/* All rights reserved.                                                      */
/*                                                                           */
/* This software may be modified and distributed under the terms             */
/* of the BSD license.  See the LICENSE file for details.                    */
/*****************************************************************************/
#ifndef __drvIOConfig_h
#define __drvIOConfig_h

///////////////////////////////////////////////////////////////////////////////
// General include files
#include <krnlTypes.h>
#include <drvGPS.h>



/******************************************************************************
 * General definitions
 *****************************************************************************/

///////////////////////////////////////////////////////////////////////////////
// Versions numbers
#define VERSION_HIGH 0
#define VERSION_LOW 1

// Steering servo output
#define SteeringServoInit() drvServoInitCh0PA15()
#define SteeringServoSetPos(x) drvServoSetPos0(x)


///////////////////////////////////////////////////////////////////////////////
// UART definitions

// GPS UART
#define drvUART1_BAUD_RATE 9600
#define drvGPSUARTInit drvUART1Init

#define drvSIM900UARTSendCharacter drvUART1SendCharacter
#define krnlUART1ReceiveInterrupt drvGPSUARTReceiveInterrupt
#define krnlUART1TransmitInterrupt drvGPSUARTTransmitInterrupt
#define drvGPSUARTEnableTransmitInterrupt drvUART1EnableTransmitInterrupt
#define drvGPSUARTDisableTransmitInterrupt drvUART1DisableTransmitInterrupt

// APC220 UART
#define UART2_BAUD_RATE 2400
#define drvBPM70UARTOpen drvUART2Open
#define drvBPM70UARTClose drvUART2Close
#define drvBPM70UARTSendCharacter drvUART2SendCharacter
#define krnlUART2ReceiveInterrupt drvBPM70UARTReceiveInterrupt
#define krnlUART2TransmitInterrupt drvBPM70UARTTransmitInterrupt


#endif
